﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Linq.Expressions;
using AdventureWorks.Entities;

namespace AdventureWorksData.DAO
{
	public interface IGenericRepository<T> : IDisposable where T : class
	{
		void Delete(int id);
		void Delete(T entityToDelete);
		IEnumerable<T> Get(Expression<Func<T, bool>> filter = null, Func<IQueryable<T>, IOrderedQueryable<T>> orderBy = null, string includeProperties = "");
		T Get(int id);
		void Insert(T entity);
		void Update(T entityToUpdate);
	}
}
